﻿using SmartCity.Shared;

namespace PublicGateway.Host.Controllers
{
    /// <summary>
    /// 上传输出
    /// </summary>
    public class UploadResponse: ActionResponse<UploadResponse>
    {
        /// <summary>文件名</summary>
        public string FileName { get; set; }

        /// <summary>文件访问地址</summary>
        public string Url { get; set; }

        /// <summary>
        /// 成功
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="url"></param>
        public static UploadResponse Successful(string fileName, string url)
        {
            var result = Successful();
            result.FileName = fileName;
            result.Url = url;
            return result;
        }
    }
}